import axios from '@/utils/axios'

// 获取用户个人信息
export const user = () => {
  return axios({
    method: 'GET',
    url: '/mp/v1_0/user/profile'
  })
}

// 修改用户个人信息
export const editUser = data => {
  return axios({
    method: 'PATCH',
    url: '/mp/v1_0/user/profile',
    data
  })
}

// 编辑用户头像
export const editAvatar = data => {
  return axios({
    method: 'PATCH',
    url: '/mp/v1_0/user/photo',
    data // formdata对象
  })
}
